package com.bbyl.model.bean;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

/**
 * 服务端通用返回参数
 * Created by sunsg on 2017/6/2.
 */
//"action": "verifymobile",
//        "success": 0,
//        "return_time": 1439893503,
//        "error": {
//        "code": -6011,
//        "message": "1分钟内请勿重复验证"
//        }
public class BaseResult implements Serializable {

    private int uid;

    private int success;

    @SerializedName("error_msg")
    private String errorMsg;

    @SerializedName("error_code")
    private int errorCode;

    @SerializedName("os")
    private int os;

    @SerializedName("osv")
    private float osv;

    @SerializedName("deivce_id")
    private String deviceId;

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "uid='" + uid + '\'' +
                ", success=" + success +
                ", os=" + os +
                ", osv=" + osv +
                '}';
    }

    public boolean isSuccess() {
        return 1 == success;
    }

    public int getOs() {
        return os;
    }

    public void setOs(int os) {
        this.os = os;
    }

    public float getOsv() {
        return osv;
    }

    public void setOsv(float osv) {
        this.osv = osv;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
}
